load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "descmetadata",
    srcs = ["metadata_updater.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/sql/descmetadata",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/jobs/jobspb",
        "//pkg/keys",
        "//pkg/settings",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/catalog/descs",
        "//pkg/sql/catalog/tabledesc",
        "//pkg/sql/isql",
        "//pkg/sql/schemachanger/scexec",
        "//pkg/sql/sessiondata",
        "//pkg/sql/sessioninit",
        "//pkg/sql/ttl/ttlbase",
    ],
)

go_test(
    name = "descmetadata_test",
    srcs = ["main_test.go"],
    deps = [
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/randutil",
    ],
)
